package com.bblocks.enums;

import com.bblocks.exception.ServiceException;

/**
 * 字典表professionCode枚举
 * @author yanmeng
 */

public enum ProfessionCodeEnum {
    /**
     * 字典表professionCode枚举
     */
    ESF(1, "二手房"),
    ZXSC(2, "资讯收藏"),
    ZXDZ(3, "资讯点赞"),
    XZL(4, "写字楼"),
    CYY(5, "产业园"), //产业园、共享办公、厂房仓库
    DJ_GW(28,"单间/工位"),
    SP(143,"商铺"),
    ZF(144,"租房"),
	ZF_ROOM(1441,"租房间"),
    GXBG(145,"共享办公"),
    TCW(249,"停车位"),
    HX(746,"户型"),
    YY(781,"预约"),
    KH(782,"客户"),
    JJR(900,"经纪人"),
    PLDZ(989,"评论点赞"),
    XF(990,"新房"),
    SJ(991,"商家"),
    ZB(992,"直播"),//其实是资讯-短视频
    BW(1043,"爆文"),
    CF(1086,"厂房"),
    CK(1087,"仓库"),
    TYFW(1149,"通用服务"),
    DSSP(1161,"电商商品"),
    HDLP(1162,"活动礼品"),
	LIVE_VIDEO(1171,"直播视频"),//yz_living

	PACKAGE(1617,"套餐包"),


	LCANCEL(1172,"租约解约"),
    ;

    private Integer code;
    private String name;

    ProfessionCodeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

	private static ProfessionCodeEnum[] values = ProfessionCodeEnum.values();
	public static ProfessionCodeEnum getByCode(Integer code) {
		for (ProfessionCodeEnum c : values) {
			if (c.getCode().equals(code) ) {
				return c;
			}
		}

		throw new ServiceException("无此类型："+code);
	}
}
